import request from '@/utils/request'

/**
 * @description: 后端根据用户ID和name获得所有消息
 */
export function getMsgByIdAndName(data) {
  return request({
    url: '/sys-msg/socketMsg/page',
    method: 'get',
    params: {
      startDate: data.startDate,
      endDate: data.endDate,
      currentPage: data.currentPage,
      pageSize: data.pageSize,
      status: data.status,
      type: data.type
    }
  })
}

/**
 * @description: 根据模板ID获得消息
 * @param   ID 状态(0:已读,-1:未读,-2:删除)
 * @param   receiveLogId 站内信接收记录id
 */
export function getMsgTemplateById(id) {
  return request({
    url: '/sys-msg/templates',
    method: 'GET',
    params: {
      id: id,
    }
  })
}
